/**
 *  Copyright (c) 2017-2022 Rushang Co.Ltd All Rights Reserved.
 */
package com.rshang.rsdp.common.status;

/**
 * 功能简介：系统状态码枚举类<br/>
 * @author zhangjun
 * @create 2017年7月31日下午2:54:23
 * 
 */
public enum StatusCode {

	CAPTCHA_ERROR(200001,"login.yzm.error"),//验证码错误
	LOGIN_FAILED(200002,"login.user.error"),//用户名或密码错误
	
	SUCCESS(200,"oper.success"),//成功
	OPER_FAILED(500,"oper.error"),//操作失败
	SERVER_ERROR(500,"server.error"),//服务错误
	BAD_REQUEST(400,"request.bad"),//请求格式错误，参数错误
	UNAUTHORIZED(401,"auth.error"),//未授权
	REQUEST_NOTFOUND(404,"request.notfound"),//请求的资源不存在，数据不存在
	CONFLICT(409,"resource.conflict");//数据重复，存在冲突
	
	
	private int code;
	private String key;
	
	StatusCode(int code, String key) {
        this.code = code;
        this.key = key;
    }
	public int getCode() {
		return code;
	}
	public String getKey() {
		return key;
	}
}
